<template>
	<view>
		<view class="version-info">
			<block>
				<!--u-skeleton-circle 绘制圆形 -->
				<image class="version-info-avatar u-skeleton-circle" src="/static/images/systemConfig/icon.png">
				</image>
				<text v-if="version != ''" class="version-info-text">当前版本 V{{this.version}}</text>
			</block>
		</view>
		<view class="download-content">
			<view>APP下载</view>
			<image class="download-code" src="/static/images//userCenter/appDownload.png">
		</view>
		<view class="privacy-content">
			<view style="text-align: center;">组件说明</view>
			<u-read-more ref="uReadMore" :toggle="true" showHeight="205">
				<u-parse :content="content" :selectable="true" @load="load"></u-parse>
			</u-read-more>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				version: '',
				content: `
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">HBuilder X: </span><span style="font-size: 32rpx;color: #303133;">3.7.8</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">Vue: </span><span style="font-size: 32rpx;color: #303133;">2</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">UView-ui: </span><span style="font-size: 32rpx;color: #303133;">2.0</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">Qiun-data-charts: </span><span style="font-size: 32rpx;color: #303133;">2.5.0</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">Webview: </span><span style="font-size: 32rpx;color: #303133;">1.5.2</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">DCloud AppID: </span><span style="font-size: 32rpx;color: #303133;">__UNI__855FDD9</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">微信小程序AppID: </span><span style="font-size: 32rpx;color: #303133;">wxca86024da0694d55</span></div>
					<div style="margin: 30rpx 0;"><span style="font-size: 30rpx;font-weight: 600;">微信 JS-SDK: </span><span style="font-size: 32rpx;color: #303133;">1.4.0</span></div>
				`
			}
		},
		created() {
			// 判断能否使用plus
			// #ifdef APP-PLUS
			this.version = plus.runtime.version
			// #endif
		},
		methods: {
			load() {
				this.$refs.uReadMore.init();
			}
		}
	}
</script>

<style lang="scss">
	.version-info {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
		height: 100%;
	}

	.version-info-avatar {
		width: 300rpx;
		height: 300rpx;
		margin: 50rpx 0 50rpx 0;
		border-radius: 50%;
	}

	.version-info-text {
		margin-bottom: 50rpx;
	}
	
	.download-content {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	
	.download-code {
		width: 380rpx;
		height: 380rpx;
	}

	.privacy-content {
		padding: 32rpx;
	}
</style>
